<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title>审批系统</title>
    <style>
      /* 全局加载样式 */
      #app {
        font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
      }
      
      /* 隐藏可能的错误覆盖层 */
      iframe[src*="webpack-dev-server"] {
        display: none !important;
      }
      
      /* 覆盖 webpack 错误显示 */
      #webpack-dev-server-client-overlay,
      #webpack-dev-server-client-overlay-div {
        display: none !important;
      }
    </style>
    <script>
      // 阻止 webpack-dev-server 显示错误覆盖层
      if (window.__webpack_dev_server_client__) {
        window.__webpack_dev_server_client__.options.overlay = false;
      }
      
      // 全局错误拦截
      window.addEventListener('error', function(e) {
        // 阻止默认的错误显示
        e.preventDefault();
        e.stopPropagation();
        
        console.error('Global error intercepted:', e.error || e.message);
        
        // 不让错误向上冒泡
        return false;
      }, true);
      
      // Promise 错误拦截
      window.addEventListener('unhandledrejection', function(e) {
        // 阻止默认的错误显示
        e.preventDefault();
        e.stopPropagation();
        
        console.error('Unhandled promise rejection intercepted:', e.reason);
        
        // 不让错误向上冒泡
        return false;
      });
    </script>
  </head>
  <body>
    <noscript>
      <strong>抱歉，本应用需要启用 JavaScript 才能正常运行。</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>
